package com.peng.security.distributed.uaa.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.security.oauth2.provider.token.TokenStore;
import org.springframework.security.oauth2.provider.token.store.InMemoryTokenStore;

/**
 * @program: distributed-security
 * @description: 令牌存储配置
 * @author: Mr.Wang
 * @create: 2020-01-02 17:14
 **/
@Configuration
public class TokenConfig {

    //令牌存储策略
    @Bean
    public TokenStore tokenStore() {
        return new InMemoryTokenStore();//内存方式,生产普通令牌
    }
}
